package teamGiga.action;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import teamGiga.bean.BuyInfoBean;
import teamGiga.bean.MovieMemberBean;
import teamGiga.dao.MovieDao;
import action.servlet.ActionForWard;

public class InsertBuyAction extends Action{
	private String path;
	private boolean redirect;
	public InsertBuyAction(String path, boolean redirect) {
		super();
		this.path = path;
		this.redirect = redirect;
	}
	public InsertBuyAction() {
		super();
	}
	@Override
	public ActionForWard execute(HttpServletRequest request,
			HttpServletResponse response) {
		// TODO Auto-generated method stub
		int buyno=0;
		int mbno=Integer.parseInt(request.getParameter("mbno"));
		String mname=request.getParameter("mname");
		int pay=Integer.parseInt(request.getParameter("pay"));
		int savepoint=Integer.parseInt(request.getParameter("savepoint"));
		String imgname=request.getParameter("imgname");
		String vodname=null;
		String tname=request.getParameter("tname");
		String taddress=request.getParameter("taddress");
		int trnum=Integer.parseInt(request.getParameter("trnum"));
		String showdate=request.getParameter("showdate");
		String showtime=request.getParameter("showtime");
		int runtime=Integer.parseInt(request.getParameter("runtime"));
		String seat=request.getParameter("seat");
		String regdate="";
		
		BuyInfoBean buyBean=new BuyInfoBean(buyno, mbno, mname, pay, savepoint, imgname, vodname, tname, taddress, trnum, showdate, showtime, runtime, seat, regdate);
		
		return new ActionForWard(path, redirect);
	}
	
}
